
<%@page import="Entity.Account"%>
<%@page import="DataAccess.UserAccess"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Edit Account</title>
        <style type="text/css" title="currentStyle">
                        @import "../css/main.css";
                        @import "../css/menu.css";
                        @import "../menu/menu_style.css";
                        .ui-widget{font-size:0.7em;}
                        .ui-helper-hidden-accessible{clip:auto;}
        </style>
    </head>
    <body>
        <%@include file="../headerAdmin.jsp" %>
         <%
            Long ID = Long.parseLong(request.getParameter("ID"));
            user = new UserAccess();
            Account acc = new Account();
            acc = user.getUserByID(ID);
        %>
        <div id="text">
            Sửa thông tin người dùng
        </div>
        <div id="center">
        <form action="/account" method="post" >
            <input type="hidden" name="action" value="edit"/>
            <table align="center">
                <tbody>
                    <tr>
                        <td> <label >ID&nbsp;&nbsp;</label></td>
                        <td> <input type="text" readonly="true" name="txtID" style="width:400 px;" width="400" value="<% out.print(acc.getId()); %>" ></td>
                    </tr>
                    <tr>
                        <td> <label >Username&nbsp;&nbsp;</label></td>
                        <td> <input type="text" disabled="true" name="txtUsername" style="width:400 px;" width="400" value="<% out.print(acc.getUsername()); %>" ></td>
                    </tr>
                    <tr>
                        <td> <label >Password&nbsp;&nbsp;</label></td>
                        <td>  <input type="password" name="txtPassword" style="width:400 px;" width="400" ></td>
                    </tr>
                    <tr>
                        <td>
                            <label>Full Name</label>
                        </td>
                        <td>
                            <input type="text" name="txtFullName" style="width:400 px;" value="<% out.print(acc.getFullname()); %>" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"><label>
                            <input type="radio" name="rdRole" value="Admin" checked="true">
                            Admin
                            </label>
                            <label>
                            <input type="radio" name="rdRole" value="User">User
                            </label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center"> <br/>
                            <input type="submit" name="btnSave" style="width: 75px" value="Lưu"/>
                            <input type="submit" name="btnBack" style="width: 75px" value="Quay về"/>
                        </td>
                    </tr>
                </tbody>
            </table>
            
        </form>
        </div>
    </body>
</html>
